package inc.gome.dynamic.datasource.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import inc.gome.dynamic.datasource.entity.RestUser;
import inc.gome.dynamic.datasource.mapper.MasterMapper;
import inc.gome.dynamic.datasource.mapper.SlaveMapper;
import inc.gome.dynamic.datasource.service.SlaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/*指定数据源*/
@DS("opsDBS")
@Service
public class SlaveServiceImpl implements SlaveService {


    @Autowired
    private SlaveMapper slaveMapper;


    @Override
    public RestUser findById(Integer id) {
        return slaveMapper.findById(id);
    }

    @Override
    public void updateById(Integer id, String name) {
        slaveMapper.updateById(id,name);
    }
}
